import axios from "@/utils/request";
import {
    reactive
} from "vue";

let table_headers = reactive({})
axios.post('/vxeheaders/getHeaders',{}).then((res) => {
    console.log(res.data,'表头')
    let set = new Set()
    res.data.forEach((item) => {
        set.add(item.name)
    })
    set.forEach((item) => {
        let arr = []
        res.data.forEach((item2) => {
            if (item2.name === item) {
                arr.push(item2)
            }
        })
        table_headers[item] = arr
    })
})

export {
    table_headers
}